<?php

/**
 * news actions.
 *
 * @package    nutrition
 * @subpackage news
 * @author     Your name here
 * @version    SVN: $Id: actions.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class newsActions extends sfActions
{
  public function executeIndex(sfWebRequest $request)
  {
    $this->pager = Doctrine_Core::getTable('dynamicinfomation')->retriveNewsListExceptLastTwoPager($request->getParameter('page', 1));
  }

  public function executeShow(sfWebRequest $request)
  {
    $this->dynamicinfomation = $this->getRoute()->getObject();
    $this->dynamicinfomation->setViews($this->dynamicinfomation->getViews() +1);
    $this->dynamicinfomation->save();
  }


}
